package com.woniuxy.cloud.carl.marketing.client;


import com.woniuxy.cloud.carl.marketing.client.param.AddAdParam;
import com.woniuxy.cloud.carl.marketing.client.param.DelAdParam;
import com.woniuxy.cloud.carl.marketing.client.param.GetAdParam;
import com.woniuxy.cloud.carl.marketing.client.result.AdvertisementDto;
import com.woniuxy.cloud.carl.marketing.infra.model.Advertisement;
import com.woniuxy.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 广告 前端控制器
 * </p>
 *
 * @author Lucas
 * @since 2023-07-19
 */
@FeignClient(contextId = "advertisementClient",name = "marketing")
public interface AdvertisementClient {
    @PostMapping("/addAd")
    Result addAd(@RequestBody AddAdParam param);

    @DeleteMapping("/delAd")
    Result delAd(@SpringQueryMap DelAdParam param);
    @GetMapping("/getAd")
    Result<List<AdvertisementDto>> getAd(@SpringQueryMap GetAdParam param);
}

